package com.czlis.boe;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

public class TestMap {
	public static void main(String[] args) {
		
		String abc = "ABCDEF,";
		System.out.println(abc.substring(0, abc.length()));
		
		Map<String, String> map = new HashMap<String, String>();
		for (int i = 0; i < 10; i++) {
			map.put(i + "Key", i + "Value");
		}
		for(String key : map.keySet()) {
			System.out.println(key);
		}
		System.out.println("==========");
		Iterator<String> it = map.keySet().iterator();
		while(it.hasNext()) {
			String key = it.next();
			if(key.equals("4Key") || key.equals("0Key") ) {
				it.remove();
				System.out.println("Remove: "+key);
			}
		}
		System.out.println("========");
		for(String key : map.keySet()) {
			System.out.println(key);
		}
		
//		for(String key : map.keySet()) {
//			if(key.equals("4Key") || key.equals("0Key") ) {
//				map.remove(key);
//			}
//			System.out.println(key);
//		}
	}
}
